-
Notifications
You must be signed in to change notification settings - Fork 158
Only add disk support topologies if StorageClass parameter is true #2089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only add disk support topologies if StorageClass parameter is true #2089
Conversation
Skipping CI for Draft Pull Request. |
/ok-to-test |
9c74cce
to
44abc6e
Compare
This should have a release note as it adds a user-visible feature. |
Can you add an e2e test in test/e2e/tests/single_zone_e2e_test.go as well? |
Is this at least manually end to end tested on GCE clusters? Maybe add the test cases you did in the description. |
Added! Find them here and also in the description. |
Is this more than what's contained in the PR description? I have the |
44abc6e
to
23cab0c
Compare
/retest |
@sunnylovestiramisu @tonyzhc I have added an e2e test in the zonal file and it is passing |
Release notes get pulled out automatically for the change log so they're nice to have. |
pkg/common/parameters.go
Outdated
@@ -319,6 +324,17 @@ func (pp *ParameterProcessor) ExtractAndDefaultParameters(parameters map[string] | |||
if v != "" { | |||
p.AccessMode = v | |||
} | |||
case ParameterKeyUseAllowedDiskTopology: | |||
if !pp.EnableDiskTopology { | |||
return p, d, fmt.Errorf("parameters contains invalid option %q when disk topology is not enabled", ParameterKeyUseAllowedDiskTopology) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone has a storage class and the driver flag gets turned off, the storage class will stop working & all their workloads will be stuck.
I think it would be better to warn & ignore the irrelevant parameter. Getting a missing topology, when it's ignored, seems better than blocking workloads. I think this will make some upgrade/downgrade scenarios easier as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to warning and updated unit tests
7ce1529
to
5ad3127
Compare
/test pull-gcp-compute-persistent-disk-csi-driver-unit |
/lgtm /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hajiler, julianKatz, mattcary The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR makes the disk topology feature only add a disk support label to PV NodeAffinity if a new StorageClass parameter is specified:
use-allowed-disk-topology: true
.The benefit of this is that GKE can enable the
--disk-topology=true
flag without immediately changing PDCSI's behavior. The feature becomes available, but not enabled. Customers can then choose to enable the feature when they are ready, plus they gain the granularity of enabling it for specific disk products at a time. Since most customers need this for Hyperdisk usage, that allows them to target the functionality to their use case.I've manually tested this feature. See the steps recorded here.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: